import { ApiHideProperty, ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty } from 'class-validator';

export class CartAddVo {

  @ApiProperty({ description: '商品id' })
  @IsNotEmpty({ message: "商品id不能为空" })
  productId: number

  @ApiProperty({ description: '商品名称' })
  @IsNotEmpty({ message: "商品名称不能为空" })
  productName: string

  @ApiProperty({ description: '商品图片' })
  @IsNotEmpty({ message: "商品图片不能为空" })
  productImg: string

  @ApiProperty({ description: '商品数量' })
  @IsNotEmpty({ message: "商品数量不能为空" })
  num: number

  @ApiProperty({ description: '商品价格' })
  @IsNotEmpty({ message: "商品价格不能为空" })
  price: number

  // 用户id
  @ApiHideProperty()
  userId: number
}